<meta charset="utf-8"/>
<script>
var str=["America","Greece","Britain","Canada","China","Egypt"]
var count=0;
   for(var i=0;i<str.length;i++){
          if (str[i].indexOf('a')!=-1||str[i].indexOf('A')!=-1){
   count=count+1;
}
}alert(count);
document.write("共有"+count);






</script>